<?php
$config = array(
    // Mustache 引擎参数 + https://github.com/bobthecow/mustache.php + https://github.com/bobthecow/mustache.php/wiki
    'Mustache_opt' => array(            
            'template_class_prefix' => '__MyTemplates_',
            'cache' => APP_ROOT.'/App/mustache_cache/',
            'cache_file_mode' => 0666, // Please, configure your umask instead of doing this :)
            'cache_lambda_templates' => true,
            'loader' => new \Mustache_Loader_FilesystemLoader(APP_ROOT.'/App/',['extension' => '.html']),
            'partials_loader' => new \Mustache_Loader_FilesystemLoader(APP_ROOT.'/App/Mustache_cache/partials/'),
            'helpers' => array('i18n' => function($text) {
                    // do something translatey here...
             }),
             'escape' => function($value) {
                     return htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
             },
             'charset' => 'ISO-8859-1',
             'logger' => new \Mustache_Logger_StreamLogger('php://stderr'),
             'strict_callables' => true,
             'pragmas' => [\Mustache_Engine::PRAGMA_FILTERS],
    )
);